package org.alex.nettychat.netty.custom.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.alex.nettychat.netty.custom.protocol.CreateGroupResponsePacket;



/**
 * 创建群里请求
 *
 * @author : alex
 */
public class CreateGroupResponseHandler extends SimpleChannelInboundHandler<CreateGroupResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, CreateGroupResponsePacket createGroupResponsePacket) throws Exception {
        System.out.println("群创建成功，Id:" + createGroupResponsePacket.getGroupId() +
                ", 成员：" + createGroupResponsePacket.getUserNameList().toString());
    }
}
